#include "object.h"
#include "class_name.h"

#include <charconv>

using namespace std;
using namespace rft;

object::~object() {}

std::size_t object::hash_code() const {
    return std::uintptr_t(this);
}

std::string object::to_string() const {
    const std::size_t buffer_size = sizeof(std::uintptr_t) * 2;
    char buffer[buffer_size] = { 0 };

    to_chars(buffer, buffer + buffer_size, std::uintptr_t(hash_code()), 16);

    return buffer;
}

std::string_view object::get_class_name() const {
    return get_static_name<decltype(*this)>();
}

parseable::~parseable() {}